from typing import *


class Solution:
    def findEvenNumbers(self, digits: List[int]) -> List[int]:
        cnt = [0] * 10
        for v in digits:
            cnt[v] += 1
        ans = []
        for i in range(1, 10):
            if cnt[i] > 0:
                cnt[i] -= 1
                for j in range(10):
                    if cnt[j] > 0:
                        cnt[j] -= 1
                        for k in range(10):
                            if cnt[k] > 0 and k & 1 == 0:
                                ans.append(i * 100 + j * 10 + k)
                        cnt[j] += 1
                cnt[i] += 1
        return ans
